package cz.muni.fi.pa165.sme.web.pages;

import cz.muni.fi.pa165.sme.web.fo.UserFO;
import cz.muni.fi.pa165.sme.web.panels.user.LoginForm;
import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.form.StatelessForm;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.ResourceModel;

/** @author jirankova */
public class LoginPage extends TemplatePage {

	public LoginPage() {
		super();
		add(new Label("title", new ResourceModel("login.title")));

		final CompoundPropertyModel<UserFO> model = new CompoundPropertyModel<UserFO>(new LoadableDetachableModel<UserFO>() {
			@Override
			protected UserFO load() {
				return new UserFO();
			}
		});

		add(new LoginForm("loginForm", model));
	}
}
